﻿@{
    ViewBag.Title = "PostEdit";
    Layout = "~/Views/Shared/_WindowLayout.cshtml";
}
@model TEWorkFlow.Domain.Sys.SysPost
@section script
{
    <script type="text/javascript">
        function SaveData() {
            var form = new mini.Form("form1");
            var o = form.getData(true);

            form.validate();
            if (form.isValid() == false) return;

            var json = mini.encode([o]);

            $.ajax({
                type: "post",
                url: "/Home/SavePost",
                data: o,
                cache: false,
                success: function (text) {
                    CloseWindow("save");
                },
                error: function (jqXHR, textStatus, errorThrown) {
                    alert(jqXHR.responseText);
                    CloseWindow();
                }
            });
        }
    </script>
}
<table class="edittable" border="1" cellpadding="0" cellspacing="0">
    <tr>
        <td style="width: 60px;">
            标题:
        </td>
        <td colspan="5">
            <input name="Title" value="@Model.Title" class="mini-textbox" required="true" style="width:100%"/>
        </td>
    </tr>
    <tr>
        <td style="width: 60px;">
            发布时间:
        </td>
        <td colspan="3" style="width: 340px;">
            <input name="PostTime" value="@Model.PostTime" class="mini-datepicker" format="yyyy-MM-dd H:mm:ss" timeFormat="H:mm:ss" showTime="true"  style="width:100%" />
        </td>
        <td style="width: 60px;">
            发布者:
        </td>
        <td style="width: 140px;">
            <input name="PostUser" value="@Model.PostUser" class="mini-textbox"  style="width:100%;" enable="false"/>
        </td>
    </tr>
    <tr>
        <td style="width: 60px;">
            内容:
        </td>
        <td style="width: 140px;" colspan="5">
            <input name="PostContent" value="@Model.PostContent" class="mini-textarea" style="width:100%;height:200px;"/>
        </td>
    </tr>
</table>
